<html>
<head>
	<meta charset="UTF-8">
	<title>修改用户信息</title>
</head>
<?php 
$row=$data['user'];
 ?>

<body>
	<table border="1" align="center" width="70%">
	<form method="post" action="admin.php?c=user&m=updateuser" enctype="multipart/form-data">
	<input type="hidden" name="uid" value="<?php echo $row['uid']; ?>"> 
		<tr>
			<td>姓名</td>
			<td><input type="text" name="username" value="<?php echo $row['uname'];?>"></td>
		</tr>
		
		<tr>
			<td>性别</td>
<td><input type="radio" name="gender" value="0" <?php if ($row['gender']==0)
			{
				echo "checked";
			} ?>>男
			<input type="radio" name="gender" value="1" <?php 
			if ($row['gender']==1) {
				echo "checked";
			}
			 ?>>女</td>
		</tr>
		<tr>
			<td>生日</td>
			<td><input type="date" name="birthdate" value="<?php echo $row['birthdate'];?>"></td>
		</tr>
		<tr>
			<td>爱好</td>
			<td>
			<input type="checkbox" name="hobby[]" value="旅游" <?php 
			if (strstr($row['hobby'], '旅游')) {
				echo "checked";
			}
			 ?>>旅游
			<input type="checkbox" name="hobby[]" value="登山" <?php 
			if (strstr($row['hobby'], '登山')) {
				echo "checked";
			}
			 ?>>登山
			<input type="checkbox" name="hobby[]" value="上网" <?php 
			if (strstr($row['hobby'], '上网')) {
				echo "checked";
			}
			 ?>>上网
			<input type="checkbox" name="hobby[]" value="游泳" <?php 
			if (strstr($row['hobby'], '游泳')) {
				echo "checked";
			}
			 ?>>游泳</td>
		</tr>
		<tr>
			<td>学历</td>
			<td>
			<select name="degree" id="">
		<option value="1" <?php 
		if ($row['degree']==1) {
			echo "selected";
		}
		 ?>>高中</option>
		<option value="2" <?php 
		if ($row['degree']==2) {
			echo "selected";
		}
		 ?>>大学</option>
		<option value="3" <?php 
		if ($row['degree']==3) {
			echo "selected";
		}
		 ?>>硕士</option>
		<option value="4" <?php 
		if ($row['degree']==4) {
			echo "selected";
		}
		 ?>>博士</option>
			</select></td>
		</tr>
		<tr>
			<td>自我介绍</td>
			<td><textarea name="intro" id="" cols="30" rows="10"><?php 
			echo $row['intro'];
			 ?></textarea></td>
		</tr>
		<tr>
			<td>头像</td>
			<td><input type="file" name="pic">
原头像：<img src="./photos/<?php echo $row['pic'];?>" width="80" height="80" alt="">
			</td>
		</tr>
		<tr>
		<td colspan="2" align="center">
			<input type="submit" value="修改">
		
		</td>
		</tr>
		 </form>
	</table>
</body>
</html>